package com.leadership.entity.actionlearning;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 刻意练习
 * 
 * @author mohanlan
 * 
 */
@Entity
@Table(name = "anchor")
public class Anchor {
    
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    
    private String code;
    
    /** 所属能力项 */
    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    private Competency competency;
    
    @Enumerated(EnumType.STRING)
    private AnchorType type;
    
    /** 刻意练习名称 */
    private String name;
    
    
    /** 刻意练习描述 */
    private String description;
    
    @Column(name = "is_disabled")
    private boolean disabled;
    
    /**
     * Auto-generated constructor stub
     */
    public Anchor() {
    }

    /**
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * @return the code
     */
    public String getCode() {
        return code;
    }

    /**
     * @return the competency
     */
    public Competency getCompetency() {
        return competency;
    }

    /**
     * @return the type
     */
    public AnchorType getType() {
        return type;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @return the description
     */
    public String getDescription() {
        return description;
    }

    /**
     * @return the disabled
     */
    public boolean isDisabled() {
        return disabled;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @param code the code to set
     */
    public void setCode(String code) {
        this.code = code;
    }

    /**
     * @param competency the competency to set
     */
    public void setCompetency(Competency competency) {
        this.competency = competency;
    }

    /**
     * @param type the type to set
     */
    public void setType(AnchorType type) {
        this.type = type;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @param description the description to set
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * @param disabled the disabled to set
     */
    public void setDisabled(boolean disabled) {
        this.disabled = disabled;
    }
}
